#!/bin/sh

# reference code: linux/kernel/latencytop.c

[ -f "/proc/latency_stats" ] || exit 0

snapshot()
{
	echo time: $(date +%s.%N)
	cat /proc/latency_stats
}

echo 0 > /proc/latency_stats
echo 1 > /proc/sys/kernel/latencytop

. $SRC/lib/wait.sh
setup_wait

wait_post_test
snapshot
echo 0 > /proc/sys/kernel/latencytop
